package com.concerneyes.rentbar.dao;

import java.io.Serializable;
import java.util.ArrayList;

public class ShoppingCartBean  implements Serializable{

    /**
     * 失效
     */
    public static final String GOOD_INVALID = "0";

    public static final String GOOD_VALID = "1";

    /**
     * 购物车商品数量
     */
    public static final String KEY_NUM = "num";
    /**
     * 购物车规格ID
     */
    public static final String KEY_PRODUCT_ID = "product_id";

    /**
     * 是否处于编辑状态
     */
    private boolean isEditing;
    /**
     * 是否被选中
     */
    private boolean isGoodsSelected;

    /**
     * 店铺名称
     */
    private String merchantName;

    /**
     * 店铺ID
     */
    private String merID;

    /**
     * 是否失效列表
     */
    private boolean isInvalidList;

    private boolean isAllGoodsInvalid;

    private Goods goods;

    public boolean isAllGoodsInvalid() {
        return isAllGoodsInvalid;
    }

    public void setIsAllGoodsInvalid(boolean isAllGoodsInvalid) {
        this.isAllGoodsInvalid = isAllGoodsInvalid;
    }
    public boolean isInvalidList() {
        return isInvalidList;
    }

    public void setIsInvalidList(boolean isInvalidList) {
        this.isInvalidList = isInvalidList;
    }

    public String getMerID() {
        return merID;
    }

    public void setMerID(String merID) {
        this.merID = merID;
    }

    public boolean isEditing() {
        return isEditing;
    }

    public boolean isGoodsSelected() {
        return isGoodsSelected;
    }

    public void setIsGoodsSelected(boolean isGoodsSelected) {
        this.isGoodsSelected = isGoodsSelected;
    }

    public Goods getGoods() {
        return goods;
    }

    public void setGoods(Goods goods) {
        this.goods = goods;
    }

    public String getMerchantName() {
        return merchantName;
    }

    public void setMerchantName(String merchantName) {
        this.merchantName = merchantName;
    }

    public void setIsEditing(boolean isEditing) {
        this.isEditing = isEditing;
    }

    /**
     * 商品类，本地用变量应该加上标志 ' _local '
     */
    public static class Goods implements Serializable{
        /**
         * 数量
         */
        private String number = "1";
        /**
         * 商品ID
         */
        private String goodsID;
        /**
         * 商品名称
         */
        private String goodsName;
        /**
         * 商品宣传图片
         */
        private String goodsLogo;
        /**
         * 商品规格
         */
        private String pdtDesc;
        /**
         * 市场价，原价
         */
        private String mkPrice;
        /**
         * 价格，当前价格
         */
        private String price;
        /**
         * 是否失效,0删除(失效),1正常
         */
        private String status;
        /**
         * 是否是编辑状态
         */
        private boolean isEditing;
        /**
         * 是否被选中
         */
        private boolean isChildSelected;
        /**
         * 规格ID
         */
        private String productID;

        /***/
        private String sellPloyID;

        /**
         * 是否是失效列表的子项
         */
        private boolean isInvalidItem;

        /**
         * 是否属于
         */
        private boolean isBelongInvalidList;

        /**
         * 临时解决方案，为了避免尾部重绘两次，增加一个虚ITEM，不显示，但是没有子项的组项，会有一条黑线，所以需要做特殊处理
         */
        private boolean isLastTempItem;

        public boolean isLastTempItem() {
            return isLastTempItem;
        }

        public void setIsLastTempItem(boolean isLastTempItem) {
            this.isLastTempItem = isLastTempItem;
        }

        public boolean isBelongInvalidList() {
            return isBelongInvalidList;
        }

        public void setIsBelongInvalidList(boolean isBelongInvalidList) {
            this.isBelongInvalidList = isBelongInvalidList;
        }

        public boolean isInvalidItem() {
            return isInvalidItem;
        }

        public void setIsInvalidItem(boolean isInvalidItem) {
            this.isInvalidItem = isInvalidItem;
        }

        public String getStatus() {
            return status;
        }

        public void setStatus(String status) {
            this.status = status;
        }

        public String getSellPloyID() {
            return sellPloyID;
        }

        public void setSellPloyID(String sellPloyID) {
            this.sellPloyID = sellPloyID;
        }

        public String getProductID() {
            return productID;
        }

        public void setProductID(String productID) {
            this.productID = productID;
        }

        public boolean isEditing() {
            return isEditing;
        }

        public void setIsEditing(boolean isEditing) {
            this.isEditing = isEditing;
        }

        public boolean isChildSelected() {
            return isChildSelected;
        }

        public void setIsChildSelected(boolean isChildSelected) {
            this.isChildSelected = isChildSelected;
        }

        public String getGoodsID() {
            return goodsID;
        }

        public void setGoodsID(String goodsID) {
            this.goodsID = goodsID;
        }

        public String getGoodsName() {
            return goodsName;
        }

        public void setGoodsName(String goodsName) {
            this.goodsName = goodsName;
        }

        public String getGoodsLogo() {
            return goodsLogo;
        }

        public void setGoodsLogo(String goodsLogo) {
            this.goodsLogo = goodsLogo;
        }

        public String getPdtDesc() {
            return pdtDesc;
        }

        public void setPdtDesc(String pdtDesc) {
            this.pdtDesc = pdtDesc;
        }

        public String getMkPrice() {
            return mkPrice;
        }

        public void setMkPrice(String mkPrice) {
            this.mkPrice = mkPrice;
        }

        public String getPrice() {
            return price;
        }

        public void setPrice(String price) {
            this.price = price;
        }

        public String getNumber() {
            return number;
        }

        public void setNumber(String number) {
            this.number = number;
        }

        @Override
        public String toString() {
            return "Goods{" +
                    "number='" + number + '\'' +
                    ", goodsID='" + goodsID + '\'' +
                    ", goodsName='" + goodsName + '\'' +
                    ", goodsLogo='" + goodsLogo + '\'' +
                    ", pdtDesc='" + pdtDesc + '\'' +
                    ", mkPrice='" + mkPrice + '\'' +
                    ", price='" + price + '\'' +
                    ", status='" + status + '\'' +
                    ", isEditing=" + isEditing +
                    ", isChildSelected=" + isChildSelected +
                    ", productID='" + productID + '\'' +
                    ", sellPloyID='" + sellPloyID + '\'' +
                    ", isInvalidItem=" + isInvalidItem +
                    ", isBelongInvalidList=" + isBelongInvalidList +
                    ", isLastTempItem=" + isLastTempItem +
                    '}';
        }
    }

    @Override
    public String toString() {
        return "ShoppingCartBean{" +
                "isEditing=" + isEditing +
                ", isGroupSelected=" + isGoodsSelected +
                ", merchantName='" + merchantName + '\'' +
                ", merID='" + merID + '\'' +
                ", isInvalidList=" + isInvalidList +
                ", isAllGoodsInvalid=" + isAllGoodsInvalid +
                ", goods=" + goods +
                '}';
    }
}
